<template>
  <div>
    <div>11111-{{ qiankunState.aaa }}</div>
    <br />
    <el-button @click="jump">跳转</el-button>
    <el-button @click="jump2">跳转别的模块</el-button>
    <div>{{ list }}</div>
  </div>
</template>

<script>
import { mapState, mapActions } from "vuex";
import { getList } from "@/api/test/test";

export default {
  computed: {
    ...mapState("qiankunState", ["qiankunState"]),
  },
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    // setTimeout(() => {
    //   // this.SetQiankunnStates({ aaa: "cccvcc" });
    //   this.$qiankun.setGlobalState({ aaa: "cccvcc" });
    // }, 4000);
    getList().then((res) => {
      this.list = res.records;
    });
  },
  methods: {
    ...mapActions("qiankunState", ["SetQiankunnStates"]),
    jump() {
      this.$router.push("/oilsForm");
    },
    jump2() {
      // this.$qiankun.router.push("/modules/knowledge/knowledge/info");
      this.$qiankun.$router.push("/infoType", "knowledge");
    },
  },
};
</script>

<style scoped></style>
